﻿GER = { #Germany
	use_culture_states = yes
	
	is_major_formation = yes
	
	unification_play = dp_unify_germany
	leadership_play = dp_leadership_germany

	required_states_fraction = 0.7
	
	ai_will_do = { has_technology_researched = pan-nationalism }

	possible = {
		OR = {
			country_has_primary_culture = cu:north_german
			country_has_primary_culture = cu:south_german
			country_has_primary_culture = cu:rheinish
		}
		#NOT = { country_has_primary_culture = cu:czech }
		any_country = {
			OR = {
				country_has_primary_culture = cu:north_german
				country_has_primary_culture = cu:south_german
				country_has_primary_culture = cu:rheinish #DVG
			}			
			has_technology_researched = pan-nationalism
		}
	}
}

ITA = { #Italy
	use_culture_states = yes
	
	is_major_formation = yes
	
	unification_play = dp_unify_italy
	leadership_play = dp_leadership_italy

	required_states_fraction = 0.8

	ai_will_do = { has_technology_researched = nationalism }

	possible = {
		OR = {
			country_has_primary_culture = cu:north_italian
			country_has_primary_culture = cu:south_italian
			country_has_primary_culture = cu:central_italian
			country_has_primary_culture = cu:sardinian 
			country_has_primary_culture = cu:maltese
			AND = {
				country_has_primary_culture = cu:venetian
				NOT = { has_law = law_type:law_presidential_republic }
			}
		}
		NOT = { country_has_primary_culture = cu:catalan }
		any_country = {
			OR = {
				country_has_primary_culture = cu:north_italian
				country_has_primary_culture = cu:south_italian
				country_has_primary_culture = cu:central_italian
				country_has_primary_culture = cu:sardinian
				country_has_primary_culture = cu:maltese 
			}
			has_technology_researched = nationalism
		}
	}
}

SCA = { #Scandinavia
	use_culture_states = yes
	
	is_major_formation = yes
	
	unification_play = dp_unify_scandinavia
	leadership_play = dp_leadership_scandinavia

	required_states_fraction = 0.9
	
	ai_will_do = { always = yes }

	# possible = { #DVG
		# any_country = {
			# OR = {
				# country_has_primary_culture = cu:scandinavian
				# country_has_primary_culture = cu:scandinavian
				# country_has_primary_culture = cu:scandinavian
			# }		
			# has_technology_researched = pan-nationalism
		# }
	# }
}

NGF = { #League of Berlin
	use_culture_states = yes

	required_states_fraction = 0.75

	possible = {
		has_technology_researched = nationalism
	}

	ai_will_do = { always = yes }
}

SGF = { #Danubian Confederation
	use_culture_states = yes

	required_states_fraction = 0.75

	possible = {
		has_technology_researched = nationalism
	}
	
	ai_will_do = { always = yes }
}

CFR = { #Rhenish Union
	use_culture_states = yes
	
	required_states_fraction = 0.75

	possible = {
		country_has_primary_culture = cu:rheinish
		has_technology_researched = nationalism
	}
	
	ai_will_do = { always = yes }
}

RHI = { #Rhineland
	use_culture_states = yes

	required_states_fraction = 0.75

	possible = {
		has_technology_researched = nationalism
	}
	
	ai_will_do = { always = yes }
}

MUS = { #Rus/Muscovy
	states = {
		STATE_MOSCOW
		STATE_BRYANSK
		STATE_SMOLENSK
		STATE_TVER
		STATE_OKA
	}

	required_states_fraction = 0.60
	
	possible = {
		has_technology_researched = nationalism
		custom_tooltip = {
			text = united_muscovy
			AND = {
				OR = {
					NOT = { exists = c:RYA }
					root = c:RYA
					c:RYA = { 
						is_subject_of = root 
					}
				}
				OR = { 
					NOT = { exists = c:MSO }
					root = c:MSO
					c:MSO = { 
						is_subject_of = root 
					}	
				}
				OR = { 
					NOT = { exists = c:TVE }
					root = c:TVE
					c:TVE = { 
						is_subject_of = root 
					}	
				}
				OR = { 
					NOT = { exists = c:NZH }
					root = c:NZH
					c:NZH = { 
						is_subject_of = root 
					}
				}
			}
		}	
	}
	
	ai_will_do = { always = yes }
}

RUS = { #Russia
	use_culture_states = yes

	is_major_formation = yes

	unification_play = dp_unify_russia
	leadership_play = dp_leadership_russia

	required_states_fraction = 0.8
	
	possible = {
		country_rank >= rank_value:major_power
		NOT = { has_journal_entry = je_nov_main }
		any_country = {
			OR = {
				country_has_primary_culture = cu:russian
				country_has_primary_culture = cu:north_russian
			}	
			has_technology_researched = nationalism
		}
	}
	
	ai_will_do = { always = yes }
}

YUG = { #Yugoslavia
	use_culture_states = yes

	required_states_fraction = 0.65
	
	ai_will_do = { always = yes }
}

PLC = { #Poland-Lithuania
	states = {
		STATE_BREST
		STATE_EAST_GALICIA
		STATE_GREATER_POLAND
		STATE_LESSER_POLAND
		STATE_LITHUANIA
		STATE_MAZOVIA
		STATE_POSEN
		STATE_VOLHYNIA
		STATE_WEST_GALICIA
		STATE_WEST_PRUSSIA
		STATE_MINSK
	}

	required_states_fraction = 1

	possible = {
		has_technology_researched = pan-nationalism 
		
		custom_tooltip = {
			text = can_unite_plc_txt
			NOT = { has_journal_entry = je_golden_liberty }
		}
	}
	
	ai_will_do = { always = yes }
}

UKR = {
	states = {
		STATE_KIEV
		STATE_KURSK
		STATE_SLOBOZ
	}

	required_states_fraction = 1

	possible = {
		has_technology_researched = nationalism 
	}
	
	ai_will_do = { always = yes }
}

GBR = { #Great Britain
	use_culture_states = yes

	is_major_formation = yes
	
	unification_play = dp_unify_britain
	leadership_play = dp_leadership_britain

	required_states_fraction = 0.75	
	
	ai_will_do = { always = yes }

	possible = {
		has_technology_researched = pan-nationalism
	}
}

IBE = { #Iberia
	use_culture_states = yes

	required_states_fraction = 0.9
	
	ai_will_do = { always = yes }

	possible = {
		has_technology_researched = pan-nationalism
	}
}

LIV = { #Livonia
	states = {
		STATE_ESTONIA
		STATE_LATVIA
	}

	required_states_fraction = 1
	
	ai_will_do = { always = yes }

	possible = {
		has_technology_researched = pan-nationalism
	}
}

ROM = { #Romania
	use_culture_states = yes

	required_states_fraction = 0.5

	ai_will_do = { always = yes }
}

ARI = { #Aragon-Italy
	states = {
		STATE_CATALONIA
		STATE_ARAGON
		STATE_VALENCIA
		STATE_BALEARES
		STATE_SARDINIA
		STATE_CORSICA
		STATE_MALTA
		STATE_SICILY
		STATE_CALABRIA
		STATE_CAMPANIA
		STATE_APULIA
		STATE_ABRUZZO
		STATE_LAZIO
		STATE_UMBRIA
		STATE_TUSCANY
		STATE_ROMAGNA
		STATE_EMILIA
		STATE_PIEDMONT
		STATE_LOMBARDY
		STATE_SAVOY
		STATE_VENETIA
		STATE_ISTRIA
		STATE_DALMATIA
		STATE_MALTA
	}

	required_states_fraction = 0.8

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:catalan
		has_technology_researched = pan-nationalism
    
		NOT = { country_has_primary_culture = cu:central_italian}	
		NOT = { country_has_primary_culture = cu:north_italian}
		NOT = { country_has_primary_culture = cu:venetian}
		NOT = { country_has_primary_culture = cu:south_italian}
		NOT = { country_has_primary_culture = cu:maltese}
	}
}

RUT = { #Ruthenia
	use_culture_states = yes

	required_states_fraction = 0.8

	ai_will_do = { always = yes }

	possible = {
		has_technology_researched = pan-nationalism
	}
}

SIC = { #Two Sicilies
	use_culture_states = yes

	required_states_fraction = 1

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:south_italian
	}
}

CSK = { #Cossackia
	use_culture_states = yes

	required_states_fraction = 0.65

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:cossack
		#any_country = {
		#	country_has_primary_culture = cu:cossack
		#	has_technology_researched = nationalism
		#}
	}
}

OCC = { #Occitania
	use_culture_states = yes

	required_states_fraction = 0.8

	ai_will_do = { always = yes }
}

HLR = { #Holy Roman Empire
	states = {
		STATE_BOHEMIA
		STATE_SILESIA
		STATE_MORAVIA
		STATE_BRANDENBURG
		STATE_POMERANIA
		STATE_AUSTRIA
		STATE_STYRIA
		STATE_SLOVENIA
		STATE_TYROL
		STATE_EAST_SWITZERLAND
		STATE_WEST_SWITZERLAND
		STATE_BADEN
		STATE_WURTTEMBERG
		STATE_BAVARIA
		STATE_FRANCONIA
		STATE_THURINGIA
		STATE_SAXONY
		STATE_ANHALT
		STATE_HANNOVER
		STATE_EAST_FRISIA
		STATE_WESTPHALIA
		STATE_RHINELAND
		STATE_PALATINATE
		STATE_ALSACE
		STATE_HESSE
		STATE_NORTH_RHINE
		STATE_MECKLENBURG
		STATE_SCHLESWIG_HOLSTEIN
	}
	
	is_major_formation = yes
	
	unification_play = dp_unify_the_empire
	leadership_play = dp_leadership_the_empire

	required_states_fraction = 0.90	

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:czech
		NOT = {
			year >= 1848
			has_global_variable = hre_fail
		}
		custom_tooltip = {
			text = hre_variable_tt
			has_global_variable = hre_success_1
		}
	}
}

ENG = { #England
	states = {
		STATE_HOME_COUNTIES
		STATE_MIDLANDS
		STATE_EAST_ANGLIA
		STATE_WEST_COUNTRY
		STATE_YORKSHIRE
		STATE_LANCASHIRE
	}
	
	required_states_fraction = 0.85	
	
	ai_will_do = { always = yes }
	
	possible = {
        OR = {
            country_has_primary_culture = cu:beornian
            country_has_primary_culture = cu:british
        }
	}
}

NET = { #Netherlands
	states = {
		STATE_FRIESLAND
		STATE_HOLLAND
		STATE_GELRE
		STATE_FLANDERS
	}
	
	is_major_formation = yes
	
	unification_play = dp_unify_dutch
	leadership_play = dp_leadership_dutch

	required_states_fraction = 0.50	

	ai_will_do = { always = yes }

	possible = {
		OR = {
			country_has_primary_culture = cu:boer
			country_has_primary_culture = cu:dutch
		}	
		any_country = {
			OR = {
				country_has_primary_culture = cu:boer
				country_has_primary_culture = cu:dutch
			}		
			has_technology_researched = nationalism
		}
	}
}

ITC = { #Italian Confederation
	states = {
		STATE_SAVOY
		STATE_PIEDMONT
		STATE_EMILIA
		STATE_TUSCANY
		STATE_ROMAGNA
		STATE_LOMBARDY
		STATE_UMBRIA
		STATE_LAZIO
		STATE_CORSICA
	}
	
	required_states_fraction = 0.75	

	ai_will_do = { always = yes }

	possible = {
		OR = {
			country_has_primary_culture = cu:north_italian
			country_has_primary_culture = cu:central_italian
		}
		any_country = {
			OR = {
				country_has_primary_culture = cu:north_italian
				country_has_primary_culture = cu:central_italian
			}
			has_technology_researched = nationalism
		}
	}
}

SAX = { #Saxony
	states = {
		STATE_SAXONY
		STATE_THURINGIA
	}
	
	required_states_fraction = 1.00

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:north_german
		has_technology_researched = nationalism
	}
}

SWZ = { #Switzerland Confederation
	states = {
		STATE_EAST_SWITZERLAND
		STATE_WEST_SWITZERLAND
		STATE_FRANCHE_COMTE
	}
	
	required_states_fraction = 0.50	

	ai_will_do = { always = yes }

	possible = {
		has_technology_researched = nationalism
	}
}

TAR = { #Tatarstan
	use_culture_states = yes

	required_states_fraction = 0.65

	ai_will_do = { always = yes }

	possible = {
		country_has_primary_culture = cu:tatar
		any_country = {
			country_has_primary_culture = cu:tatar
			has_technology_researched = nationalism
		}
	}
}

LVL = { #Livland
	states = {
		STATE_ESTONIA
		STATE_LATVIA
	}

	required_states_fraction = 1
	
	ai_will_do = { always = yes }

	possible = {
	}
}

CRO = { #Croatia
	use_culture_states = yes

	required_states_fraction = 1

	ai_will_do = { always = no }
}

COP = { #Corsica-Piedmont
	states = {
		STATE_CORSICA
		STATE_PIEDMONT
	}

	required_states_fraction = 1

	ai_will_do = { always = no }

	possible = {
		country_has_primary_culture = cu:central_italian
		NOT = { country_has_primary_culture = cu:north_italian }
	}
}